package com.woniu.project.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.project.core.domain.Management;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Klaus
 * @since 2020-10-13
 */
public interface ManagementMapper extends BaseMapper<Management> {
    @Select("select management_id,management_name\n" +
            ",management_password,management_add_time\n" +
            "management_phone,management_status from pawn_management \n" +
            "where management_phone = #{managementPhone} and management_password = #{managementPassword}")
    Management selectManagementByPhoneAndPassword(@Param("managementPhone") String managementPhone, @Param("managementPassword") String managementPassword);

    @Select("select management_id,management_name\n" +
            "management_password,management_add_time\n" +
            "management_phone,management_status \n" +
            "from pawn_management \n" +
            "WHERE management_phone = #{managementPhone} or management_name = #{managementName}")
    Management SelectManageMentByPhoneOrName(@Param("managementPhone") String managementPhone,@Param("managementName") String managementName);

}
